package cn.com.surker.report.dao;

import cn.com.surker.report.entity.ReportSale;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 销售分析 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2022-09-14
 */
public interface ReportSaleDao extends BaseMapper<ReportSale> {


    /**
     * 统计集团周报
     * @param startDate
     * @param endDate
     * @return
     */
    List<ReportSale> queryGroupWeekData(String startDate, String endDate);

    /**
     * 查询历史数据
     * @param orgId
     * @param today
     * @param code
     * @return
     */
    List<ReportSale> queryByOneReport(Long orgId, String today, Integer type);


    /**
     * 查询月报统计数据
     * @param type
     * @param orgId
     * @param startDate
     * @param endDate
     * @return
     */
    ReportSale queryMonthData(Integer type, Long orgId, String startDate, String endDate);

    /**
     * 查询年报统计数据
     * @param type
     * @param orgId
     * @param startDate
     * @param endDate
     * @return
     */
    List<ReportSale> queryYearData(Integer type, Long orgId, String startDate, String endDate);

    /**
     * 查询历史数据
     * @param today
     * @return
     */
    List<ReportSale> queryStationDetail(String today, Integer type);

    /**
     * 查询同比小票汇总
     * @param type
     * @param orgId
     * @param today
     * @return
     */
    ReportSale totalYOYTicket(Integer type, Long orgId, String today);

}
